﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DesignWork.ascx.cs"
    Inherits="FrameWork.web.Web.UC.DesignWork" %>
<%@ Register Src="~/Web/UC/FileListCtrl.ascx" TagName="FileListCtrl" TagPrefix="uc1" %>
<div class="sect">
    <div class="sectitle">
        <img onclick="fold(this);" src="../../Image/proj/zd.gif" class="sectifld" alt="" />
        <div class="title">设计</div><div class="clear"></div>
    </div>
    <div class="secinfo">
        <table id="tblworkteam" class="tbl" border="0" cellpadding="0" cellspacing="0">
            <tr style="display: none;">
                <td class="caption">
                </td>
                <td width="30%">
                </td>
                <td class="caption">
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td class="caption">
                    平面图
                </td>
                <td width="30%">
                    <uc1:FileListCtrl ID="fc_plane" runat="server" OrderFileClass="DrawingPlane" /> 
                </td>
                <td class="caption">
                    效果图
                </td>
                <td><uc1:FileListCtrl ID="fc_Scene" runat="server" OrderFileClass="DrawingScene" /> 
                </td>
            </tr>
            <tr>
                <td class="caption">
                    施工图
                </td>
                <td><uc1:FileListCtrl ID="fc_Contruction" runat="server" OrderFileClass="DrawingContruction" /> 
                </td>
                <td class="caption">
                    物料清单
                </td>
                <td><uc1:FileListCtrl ID="fc_Material" runat="server" OrderFileClass="FileMaterial" /> 
                </td>
            </tr>
             <tr>
                <td class="caption">
                   设计备注
                </td>
                <td colspan="3">
                     <SljaCC:TextBoxLabel ID="tlbDesignMemo" runat="server" TextMode="MultiLine" Width="70%"></SljaCC:TextBoxLabel>
                </td>
            </tr>
        </table>
    </div>
</div>
<script type="text/javascript">
    function callback(fileclass) {
        //变量：top.coverDivReturnValue是定义在DivCoverWindow.js上的top的传递变量.
        var obj = top.coverDivReturnValue;
        var name = obj.path.match(/[^\/]+$/)[0];
        $("table[dname='"+fileclass+"'").append("<tr><td width='70%' align='left'><input type='hidden' id='fid' value='"+obj.id+"'/><a href='"+obj.path+"'>"+name+"</a></td><td><a href='javascript:void(0);' id='_del' onclick='javascript:if(confirm(&#39;真的要从服务器删除该文件？&#39;)){fileDelete(this);} void(0);' style='text-decoration:none;' title='删除'>×</a></td></tr>")

    }
    function uploadDesignFile(fileclass) {
        var orderid = '<%=Order.ID %>';
        var prjid = '<%=Order.PrjID %>';
        top.loadwindow("/web/project/SelPage/UploadFile.aspx?orderid=" + orderid + "&prjid=" + prjid + "&fileclass=" + fileclass + "&rdm=" + Math.random(), 500, 400, "文件上传", function () { callback.call(window, fileclass); });
    }
</script>
